package com.wwwarehouse.resource_center.eventbus_event;

/**
 * @author Joseph on 2017/9/18.
 *         <p/>
 */

public class GoodsEvent<T>  {
    public  static final int GOODS_ADD_LABEL = 1;     //新增标签
    public  static final int GOODS_ADD_LABEL_REFRESH = 2;     //新增标签添加到最后刷新
    public  static final int GOODS_ADD_LABEL_NOTICE = 3;     //数据显示完再通知获取新数据刷新界面
    public  static final int GOODS_ATTRIBUTE_SELECT_NOTICE = 4;     //属性选择完成
    public  static final int GOODS_LABEL_SELECT_NOTICE = 5;         //标签选择完成
    public  static final int GOODS_LABE = 6;         //属性选择完成确认
    public  static final int GOODS_DELETE = 7;         //物和资源删除刷新页面
    public  static final int GOODS_MODIFY = 8;         //物和资源修改刷新页面
    private int code;
    private T data;
    private String msg;

    public GoodsEvent(int code) {
        this.code = code;
    }

    public GoodsEvent(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public GoodsEvent(int code, T data) {
        this.code = code;
        this.data = data;
    }

    public GoodsEvent(int code, T data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
